package jframe1;

import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class MoveDemo extends JFrame{

	MyPanel2 mp = null;
	
	public MoveDemo(){
	
		mp = new MyPanel2();
		this.add(mp);
		this.addKeyListener(mp);
		this.setSize(400, 400);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setVisible(true);
	}
	
	public static void main(String[] args) {
		MoveDemo md = new MoveDemo();
	}
	
}
